using MicroMsg.Common.Event;
using System;
using System.Collections.Generic;
namespace MicroMsg.Storage
{
	public class QFriendStorage : StorageTable<QFriend, uint>
	{
		public QFriendStorage() : base((QFriend qf) => qf.nQQ)
		{
		}
		public bool updateList(List<QFriend> friendList)
		{
			return friendList != null && friendList.get_Count() > 0 && base.updateList<uint>(friendList, (QFriend f) => f.nQQ);
		}
		public List<QFriend> getListByGroupID(int groupID)
		{
			return base.getList((QFriend f) => f.nGroupID == groupID);
		}
		public int count(int groupID)
		{
			return base.method_0((QFriend f) => f.nGroupID == groupID);
		}
		public List<QFriend> getQFriendList(int groupID, int start, int count)
		{
			return base.getList((QFriend f) => f.nGroupID == groupID, start, count);
		}
		public override void notify(int operation, QFriend item)
		{
			EventCenter.postCombineEvent(EventConst.ON_STORAGE_QQ_FRIEND_ADD + operation, item);
		}
	}
}
